Skip to content

Add CI workflow with coverage gate and pin the Rust toolchain - #424

Merged
gmiliaras merged 3 commits into
mainfrom
2.0.x
Sep 9, 2026
Merged

Add CI workflow with coverage gate and pin the Rust toolchain#424
gmiliaras merged 3 commits into
mainfrom
2.0.x

Conversation

@gmiliaras

@gmiliaras gmiliaras commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Adds CI for the repo, which has had no workflows since the v2 rewrite.

  • .github/workflows/ci.yml: fmt, clippy (warnings denied), tests and doctests on Linux and Windows, a 90% line-coverage floor, and a release build on every PR and push to main. Also fixes the CodeQL "no source code seen" failure by giving it workflow sources to scan.
  • rust-toolchain.toml pins Rust 1.98 so local and CI results match.
  • make now runs the same checks as CI; make help lists all targets.
  • Drops inert grcov marker comments and fixes a clippy 1.98 lint result_unit_err).
  • Fixes the issues surfaced by running the test suite on Windows for the first time: unix-only tests are now gated cfg(unix), a blocking-script test works under dash as well as bash, and 0-byte tar bundles are rejected before invoking system tar — bsdtar (the system tar on Windows) accepts an empty file as a valid archive, so a corrupt bundle previously "deployed" an empty directory instead of failing.

Note for reviewers: Windows tests must run from an elevated shell, the agent's secure files carry a SYSTEM+Administrators-only DACL, so a non-elevated test process locks itself out. CI runners are elevated.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The default target now runs every check the release process expects:
formatting, clippy, the test suite with a 90% line-coverage floor,
doctests, and a release build. fmt checks and fmt-fix formats; lint
runs the fast format-and-clippy loop; help lists all targets. Update
README and DEVELOPMENT to match.
Run cargo fmt --check, clippy with warnings denied, the full test
suite, a coverage check enforcing a 90% line floor, and a release
build on Linux and Windows for every push and pull request against
main. Replaces the Ruby-era workflow that was removed with the v2
rewrite, and gives CodeQL's GitHub Actions analysis workflow sources
to scan.

Pin the Rust toolchain to 1.98 so local builds and CI run the same
compiler, rustfmt, and clippy.
@gmiliaras gmiliaras changed the title Strip leading backslashes from AppSpec paths on Windows Add CI workflow with coverage gate and pin the Rust toolchain Sep 7, 2026
@gmiliaras
gmiliaras force-pushed the 2.0.x branch 5 times, most recently from 68704c1 to 3426e6c Compare September 8, 2026 10:14
@gmiliaras gmiliaras closed this Sep 8, 2026
@gmiliaras gmiliaras reopened this Sep 8, 2026
@gmiliaras
gmiliaras marked this pull request as ready for review September 8, 2026 13:12
filipdanic
filipdanic previously approved these changes Sep 8, 2026
iskandarair
iskandarair previously approved these changes Sep 8, 2026
Remove the grcov exclusion marker comments; coverage is now measured
with cargo-llvm-cov, which does not read them, so they were inert.
Replace DeadlineJoiner::join's Result<T, ()> with a DeadlineExceeded
error type to satisfy clippy::result_unit_err.

Also fix test-suite portability issues surfaced by CI, and reject
0-byte tar bundles before invoking system tar: bsdtar (the system tar
on Windows) accepts an empty file as a valid archive, unlike GNU tar.

Also make the suite robust in environments beyond the CI runners:
tests that chmod a file or directory to force a denial skip under
root, which bypasses DAC checks entirely (the common case for
containerized runs); the SUID-strip extraction test skips under root,
where GNU tar deliberately honors setuid bits from archive headers;
the process-group cleanup test skips when PID 1 is a non-reaping
process (containers without an init), since unreaped zombies keep the
group alive from kill(0)'s perspective; and the IFS check retries
briefly on ETXTBSY, a fork/exec descriptor-inheritance race between
parallel test threads.
@gmiliaras
gmiliaras dismissed stale reviews from iskandarair and filipdanic via 5da2946 September 9, 2026 06:59
@gmiliaras
gmiliaras force-pushed the 2.0.x branch 2 times, most recently from 3426e6c to 5da2946 Compare September 9, 2026 06:59
@gmiliaras
gmiliaras merged commit a93dbcd into main Sep 9, 2026
16 checks passed
@gmiliaras
gmiliaras deleted the 2.0.x branch September 9, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants